import moment from "moment";
const ProductListSearchKeys = [
    {
        key: "cnName",
        label: "商品中文名称",
        placeholder: "请输入商品中文名称",
        input: true,
        rules: [{
            required: false
        }],
    },
    {
        key: "spuCode",
        label: "SPU编码",
        placeholder: "请输入SPU编码",
        input: true,
        rules: [{
            required: false
        }],
    },
    {
        key: "status",
        label: "上架状态",
        placeholder: "请选择上架状态",
        select: true,
        rules: [{
            required: false
        }],
    }, 
]
const ProductListColumn =[
    { title: 'ID', width:50, align: 'center', dataIndex:'id' }, 
    { title: '商品名', width:110, align: 'center', dataIndex: 'name' }, 
    { title: '商品中文名', width:120, align: 'center', dataIndex: 'cnName' }, 
    { title: 'SPU编码', width:90, align: 'center', dataIndex:'spuCode'  }, 
    { title: '上架',  width:90, align: 'center', scopedSlots: { customRender: 'onLine' }  }, 
    { title: '创建时间', width:100, align: 'center', dataIndex:'createTime',customRender:text =>{return moment(text).format('YYYY-MM-DD hh:mm:ss')} },
    { title: '操作', width:80, align: 'center', scopedSlots: { customRender: 'operation' } }
]
const ProductListModalKeys = [
    {
        key: "employeeName",
        label: "资金账户名称",
        placeholder: "资金账户名称",
        input: true,
        maxLength: 50,
        rules: [{
            required: true,
            message: '资金账户名称'
        }],
    },
    {
        key: "allow",
        label: "是否允许欠款",
        switcher: true,
        rules: [{
            required: true,
            message: '是否允许欠款'
        }],
    },
    {
        key: "type",
        label: "币种",
        placeholder: "请选择币种",
        select: true,
        rules: [{
            required: true,
            message: '请选择币种'
        }],
    },
    {
        key: "tops",
        label: "永久额度",
        placeholder: "请输入永久额度",
        inputNumber: true,
        precision:2,
        maxLength:0,
        rules: [{
            required: true,
            message: '请输入永久额度'
        }],
    },
    {
        key: "rat",
        label: "手续费客户承担比例",
        placeholder: "请输入手续费客户承担比例",
        inputNumber: true,
        precision:2,
        maxLength:0,
        rules: [{
            required: true,
            message: '请输入手续费客户承担比例'
        }],
    },
    {
        key: "client",
        label: "客户",
        selectMode:'multiple',
        placeholder: "请选择客户",
        select: true,
        rules: [{
            required: true,
            message: '请选择客户'
        }],
    },
]


export {
    ProductListSearchKeys, ProductListColumn, ProductListModalKeys,
}